/*! \file
 * \brief Empty.
 * \author Ivo Wingelaar
 * \date 2011
 * \version 0.1.0
 * \copyright GNU Lesser General Public License v3
 */

#ifndef __MYTH_RANDOM_RANDOM_ALGORITHM_SFMT_C_HPP_INCLUDED__
#define __MYTH_RANDOM_RANDOM_ALGORITHM_SFMT_C_HPP_INCLUDED__

#include "MythRandom_AlgorithmStub_C.hpp"
#include <emmintrin.h>

namespace Myth
{
namespace Random
{

/** class                    **/
/** AlgorithmSFMT607_C **/
//! A sfmt random number generator.
class AlgorithmSFMT607_C : public AlgorithmStub_C
{
public:
    /** constructor **/
    /// \param   int32_t seed
    ///         The seed you want to initialize the generator with.
    AlgorithmSFMT607_C( int32_t seed);

    /** default destructor **/
    virtual ~AlgorithmSFMT607_C();

    /** virtual function **/
    /** random_init      **/
    //! Initializes the generator with a new seed.
    /// \return void
    /// \param   int32_t seed
    ///         The seed to initialize the generator with.
    virtual void random_init( int32_t seed);

    /** virtual function **/
    /** get_random_bytes **/
    //! Return 32 random bits.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    virtual uint32_t get_random_bytes(void);

    /** virtual function **/
    /** get_random_int   **/
    //! Returns a random number in the interval [min, max].
    /// \return int32_t
    ///         A number between min and max (inclusive).
    /// \param   int32_t min
    ///         The smallest number allowed.
    /// \param   int32_t max
    ///         The largest number allowed.
    virtual int32_t get_random_int( int32_t min,
                                int32_t max);

    /** virtual function  **/
    /** get_random_double **/
    //! Return a random 64 bit floating point value in the interval [0, 1]
    /// \return double
    ///         A random 64 bit float.
    /// \param  void
    virtual double get_random_double(void);

private:
    /** function **/
    /** generate **/
    //! Fill the state array with new random numbers.
    /// \return void
    /// \param  void
    void generate(void);

    //! Index into state array
    uint32_t mIx;
    //! Last interval length for IRandom
    uint32_t mLastInterval;
    //! Rejection limit used by IRandom
    uint32_t mRLimit;
    //! AND mask
    __m128i mMask;
    //! State vector for SFMT generator
    __m128i mState[5];
};

/** class                     **/
/** AlgorithmSFMT1279_C **/
//! A sfmt random number generator.
class AlgorithmSFMT1279_C : public AlgorithmStub_C
{
public:
    /** constructor **/
    /// \param   int32_t seed
    ///         The seed you want to initialize the generator with.
    AlgorithmSFMT1279_C( int32_t seed);

    /** default destructor **/
    virtual ~AlgorithmSFMT1279_C();

    /** virtual function **/
    /** random_init      **/
    //! Initializes the generator with a new seed.
    /// \return void
    /// \param   int32_t seed
    ///         The seed to initialize the generator with.
    virtual void random_init( int32_t seed);

    /** virtual function **/
    /** get_random_bytes **/
    //! Return 32 random bits.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    virtual uint32_t get_random_bytes(void);

    /** virtual function **/
    /** get_random_int   **/
    //! Returns a random number in the interval [min, max].
    /// \return int32_t
    ///         A number between min and max (inclusive).
    /// \param   int32_t min
    ///         The smallest number allowed.
    /// \param   int32_t max
    ///         The largest number allowed.
    virtual int32_t get_random_int( int32_t min,
                                int32_t max);

    /** virtual function  **/
    /** get_random_double **/
    //! Return a random 64 bit floating point value in the interval [0, 1]
    /// \return double
    ///         A random 64 bit float.
    /// \param  void
    virtual double get_random_double(void);

private:
    /** function **/
    /** generate **/
    //! Fill the state array with new random numbers.
    /// \return void
    /// \param  void
    void generate(void);

    //! Index into state array
    uint32_t mIx;
    //! Last interval length for IRandom
    uint32_t mLastInterval;
    //! Rejection limit used by IRandom
    uint32_t mRLimit;
    //! AND mask
    __m128i mMask;
    //! State vector for SFMT generator
    __m128i mState[10];
};

/** class                     **/
/** AlgorithmSFMT2281_C **/
//! A sfmt random number generator.
class AlgorithmSFMT2281_C : public AlgorithmStub_C
{
public:
    /** constructor **/
    /// \param   int32_t seed
    ///         The seed you want to initialize the generator with.
    AlgorithmSFMT2281_C( int32_t seed);

    /** default destructor **/
    virtual ~AlgorithmSFMT2281_C();

    /** virtual function **/
    /** random_init      **/
    //! Initializes the generator with a new seed.
    /// \return void
    /// \param   int32_t seed
    ///         The seed to initialize the generator with.
    virtual void random_init( int32_t seed);

    /** virtual function **/
    /** get_random_bytes **/
    //! Return 32 random bits.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    virtual uint32_t get_random_bytes(void);

    /** virtual function **/
    /** get_random_int   **/
    //! Returns a random number in the interval [min, max].
    /// \return int32_t
    ///         A number between min and max (inclusive).
    /// \param   int32_t min
    ///         The smallest number allowed.
    /// \param   int32_t max
    ///         The largest number allowed.
    virtual int32_t get_random_int( int32_t min,
                                int32_t max);

    /** virtual function  **/
    /** get_random_double **/
    //! Return a random 64 bit floating point value in the interval [0, 1]
    /// \return double
    ///         A random 64 bit float.
    /// \param  void
    virtual double get_random_double(void);

private:
    /** function **/
    /** generate **/
    //! Fill the state array with new random numbers.
    /// \return void
    /// \param  void
    void generate(void);

    //! Index into state array
    uint32_t mIx;
    //! Last interval length for IRandom
    uint32_t mLastInterval;
    //! Rejection limit used by IRandom
    uint32_t mRLimit;
    //! AND mask
    __m128i mMask;
    //! State vector for SFMT generator
    __m128i mState[18];
};

/** class                     **/
/** AlgorithmSFMT4253_C **/
//! A sfmt random number generator.
class AlgorithmSFMT4253_C : public AlgorithmStub_C
{
public:
    /** constructor **/
    /// \param   int32_t seed
    ///         The seed you want to initialize the generator with.
    AlgorithmSFMT4253_C( int32_t seed);

    /** default destructor **/
    virtual ~AlgorithmSFMT4253_C();

    /** virtual function **/
    /** random_init      **/
    //! Initializes the generator with a new seed.
    /// \return void
    /// \param   int32_t seed
    ///         The seed to initialize the generator with.
    virtual void random_init( int32_t seed);

    /** virtual function **/
    /** get_random_bytes **/
    //! Return 32 random bits.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    virtual uint32_t get_random_bytes(void);

    /** virtual function **/
    /** get_random_int   **/
    //! Returns a random number in the interval [min, max].
    /// \return int32_t
    ///         A number between min and max (inclusive).
    /// \param   int32_t min
    ///         The smallest number allowed.
    /// \param   int32_t max
    ///         The largest number allowed.
    virtual int32_t get_random_int( int32_t min,
                                int32_t max);

    /** virtual function  **/
    /** get_random_double **/
    //! Return a random 64 bit floating point value in the interval [0, 1]
    /// \return double
    ///         A random 64 bit float.
    /// \param  void
    virtual double get_random_double(void);

private:
    /** function **/
    /** generate **/
    //! Fill the state array with new random numbers.
    /// \return void
    /// \param  void
    void generate(void);

    //! Index into state array
    uint32_t mIx;
    //! Last interval length for IRandom
    uint32_t mLastInterval;
    //! Rejection limit used by IRandom
    uint32_t mRLimit;
    //! AND mask
    __m128i mMask;
    //! State vector for SFMT generator
    __m128i mState[34];
};

/** class                      **/
/** AlgorithmSFMT11213_C **/
//! A sfmt random number generator.
class AlgorithmSFMT11213_C : public AlgorithmStub_C
{
public:
    /** constructor **/
    /// \param   int32_t seed
    ///         The seed you want to initialize the generator with.
    AlgorithmSFMT11213_C( int32_t seed);

    /** default destructor **/
    virtual ~AlgorithmSFMT11213_C();

    /** virtual function **/
    /** random_init      **/
    //! Initializes the generator with a new seed.
    /// \return void
    /// \param   int32_t seed
    ///         The seed to initialize the generator with.
    virtual void random_init( int32_t seed);

    /** virtual function **/
    /** get_random_bytes **/
    //! Return 32 random bits.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    virtual uint32_t get_random_bytes(void);

    /** virtual function **/
    /** get_random_int   **/
    //! Returns a random number in the interval [min, max].
    /// \return int32_t
    ///         A number between min and max (inclusive).
    /// \param   int32_t min
    ///         The smallest number allowed.
    /// \param   int32_t max
    ///         The largest number allowed.
    virtual int32_t get_random_int( int32_t min,
                                int32_t max);

    /** virtual function  **/
    /** get_random_double **/
    //! Return a random 64 bit floating point value in the interval [0, 1]
    /// \return double
    ///         A random 64 bit float.
    /// \param  void
    virtual double get_random_double(void);

private:
    /** function **/
    /** generate **/
    //! Fill the state array with new random numbers.
    /// \return void
    /// \param  void
    void generate(void);

    //! Index into state array
    uint32_t mIx;
    //! Last interval length for IRandom
    uint32_t mLastInterval;
    //! Rejection limit used by IRandom
    uint32_t mRLimit;
    //! AND mask
    __m128i mMask;
    //! State vector for SFMT generator
    __m128i mState[88];
};

/** class                      **/
/** AlgorithmSFMT19937_C **/
//! A sfmt random number generator.
class AlgorithmSFMT19937_C : public AlgorithmStub_C
{
public:
    /** constructor **/
    /// \param   int32_t seed
    ///         The seed you want to initialize the generator with.
    AlgorithmSFMT19937_C( int32_t seed);

    /** default destructor **/
    virtual ~AlgorithmSFMT19937_C();

    /** virtual function **/
    /** random_init      **/
    //! Initializes the generator with a new seed.
    /// \return void
    /// \param   int32_t seed
    ///         The seed to initialize the generator with.
    virtual void random_init( int32_t seed);

    /** virtual function **/
    /** get_random_bytes **/
    //! Return 32 random bits.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    virtual uint32_t get_random_bytes(void);

    /** virtual function **/
    /** get_random_int   **/
    //! Returns a random number in the interval [min, max].
    /// \return int32_t
    ///         A number between min and max (inclusive).
    /// \param   int32_t min
    ///         The smallest number allowed.
    /// \param   int32_t max
    ///         The largest number allowed.
    virtual int32_t get_random_int( int32_t min,
                                int32_t max);

    /** virtual function  **/
    /** get_random_double **/
    //! Return a random 64 bit floating point value in the interval [0, 1]
    /// \return double
    ///         A random 64 bit float.
    /// \param  void
    virtual double get_random_double(void);

private:
    /** function **/
    /** generate **/
    //! Fill the state array with new random numbers.
    /// \return void
    /// \param  void
    void generate(void);

    //! Index into state array
    uint32_t mIx;
    //! Last interval length for IRandom
    uint32_t mLastInterval;
    //! Rejection limit used by IRandom
    uint32_t mRLimit;
    //! AND mask
    __m128i mMask;
    //! State vector for SFMT generator
    __m128i mState[156];
};

/** class                      **/
/** AlgorithmSFMT44497_C **/
//! A sfmt random number generator.
class AlgorithmSFMT44497_C : public AlgorithmStub_C
{
public:
    /** constructor **/
    /// \param   int32_t seed
    ///         The seed you want to initialize the generator with.
    AlgorithmSFMT44497_C( int32_t seed);

    /** default destructor **/
    virtual ~AlgorithmSFMT44497_C();

    /** virtual function **/
    /** random_init      **/
    //! Initializes the generator with a new seed.
    /// \return void
    /// \param   int32_t seed
    ///         The seed to initialize the generator with.
    virtual void random_init( int32_t seed);

    /** virtual function **/
    /** get_random_bytes **/
    //! Return 32 random bits.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    virtual uint32_t get_random_bytes(void);

    /** virtual function **/
    /** get_random_int   **/
    //! Returns a random number in the interval [min, max].
    /// \return int32_t
    ///         A number between min and max (inclusive).
    /// \param   int32_t min
    ///         The smallest number allowed.
    /// \param   int32_t max
    ///         The largest number allowed.
    virtual int32_t get_random_int( int32_t min,
                                int32_t max);

    /** virtual function  **/
    /** get_random_double **/
    //! Return a random 64 bit floating point value in the interval [0, 1]
    /// \return double
    ///         A random 64 bit float.
    /// \param  void
    virtual double get_random_double(void);

private:
    /** function **/
    /** generate **/
    //! Fill the state array with new random numbers.
    /// \return void
    /// \param  void
    void generate(void);

    //! Index into state array
    uint32_t mIx;
    //! Last interval length for IRandom
    uint32_t mLastInterval;
    //! Rejection limit used by IRandom
    uint32_t mRLimit;
    //! AND mask
    __m128i mMask;
    //! State vector for SFMT generator
    __m128i mState[348];
};

/** class                        **/
/** AlgorithmSFMT607_MOA_C **/
//! A sfmt-mother-of-all random number generator.
class AlgorithmSFMT607_MOA_C : public AlgorithmStub_C
{
public:
    /** constructor **/
    /// \param   int32_t seed
    ///         The seed you want to initialize the generator with.
    AlgorithmSFMT607_MOA_C( int32_t seed);

    /** default destructor **/
    virtual ~AlgorithmSFMT607_MOA_C();

    /** virtual function **/
    /** random_init      **/
    //! Initializes the generator with a new seed.
    /// \return void
    /// \param   int32_t seed
    ///         The seed to initialize the generator with.
    virtual void random_init( int32_t seed);

    /** virtual function **/
    /** get_random_bytes **/
    //! Return 32 random bits.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    virtual uint32_t get_random_bytes(void);

    /** virtual function **/
    /** get_random_int   **/
    //! Returns a random number in the interval [min, max].
    /// \return int32_t
    ///         A number between min and max (inclusive).
    /// \param   int32_t min
    ///         The smallest number allowed.
    /// \param   int32_t max
    ///         The largest number allowed.
    virtual int32_t get_random_int( int32_t min,
                                int32_t max);

    /** virtual function  **/
    /** get_random_double **/
    //! Return a random 64 bit floating point value in the interval [0, 1]
    /// \return double
    ///         A random 64 bit float.
    /// \param  void
    virtual double get_random_double(void);

private:
    /** function **/
    /** generate **/
    //! Fill the state array with new random numbers.
    /// \return void
    /// \param  void
    void generate(void);

    /** function    **/
    /** mother_bits **/
    //! Get random bits from the mother-of-all generator.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    uint32_t mother_bits(void);

    //! Index into state array
    uint32_t mIx;
    //! Last interval length for IRandom
    uint32_t mLastInterval;
    //! Rejection limit used by IRandom
    uint32_t mRLimit;
    //! AND mask
    __m128i mMask;
    //! State vector for SFMT generator
    __m128i mState[5];
    //! State vector for Mother-Of-All generator
    uint32_t mMotherState[5];
};

/** class                         **/
/** AlgorithmSFMT1279_MOA_C **/
//! A sfmt-mother-of-all random number generator.
class AlgorithmSFMT1279_MOA_C : public AlgorithmStub_C
{
public:
    /** constructor **/
    /// \param   int32_t seed
    ///         The seed you want to initialize the generator with.
    AlgorithmSFMT1279_MOA_C( int32_t seed);

    /** default destructor **/
    virtual ~AlgorithmSFMT1279_MOA_C();

    /** virtual function **/
    /** random_init      **/
    //! Initializes the generator with a new seed.
    /// \return void
    /// \param   int32_t seed
    ///         The seed to initialize the generator with.
    virtual void random_init( int32_t seed);

    /** virtual function **/
    /** get_random_bytes **/
    //! Return 32 random bits.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    virtual uint32_t get_random_bytes(void);

    /** virtual function **/
    /** get_random_int   **/
    //! Returns a random number in the interval [min, max].
    /// \return int32_t
    ///         A number between min and max (inclusive).
    /// \param   int32_t min
    ///         The smallest number allowed.
    /// \param   int32_t max
    ///         The largest number allowed.
    virtual int32_t get_random_int( int32_t min,
                                int32_t max);

    /** virtual function  **/
    /** get_random_double **/
    //! Return a random 64 bit floating point value in the interval [0, 1]
    /// \return double
    ///         A random 64 bit float.
    /// \param  void
    virtual double get_random_double(void);

private:
    /** function **/
    /** generate **/
    //! Fill the state array with new random numbers.
    /// \return void
    /// \param  void
    void generate(void);

    /** function    **/
    /** mother_bits **/
    //! Get random bits from the mother-of-all generator.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    uint32_t mother_bits(void);

    //! Index into state array
    uint32_t mIx;
    //! Last interval length for IRandom
    uint32_t mLastInterval;
    //! Rejection limit used by IRandom
    uint32_t mRLimit;
    //! AND mask
    __m128i mMask;
    //! State vector for SFMT generator
    __m128i mState[10];
    //! State vector for Mother-Of-All generator
    uint32_t mMotherState[5];
};

/** class                         **/
/** AlgorithmSFMT2281_MOA_C **/
//! A sfmt-mother-of-all random number generator.
class AlgorithmSFMT2281_MOA_C : public AlgorithmStub_C
{
public:
    /** constructor **/
    /// \param   int32_t seed
    ///         The seed you want to initialize the generator with.
    AlgorithmSFMT2281_MOA_C( int32_t seed);

    /** default destructor **/
    virtual ~AlgorithmSFMT2281_MOA_C();

    /** virtual function **/
    /** random_init      **/
    //! Initializes the generator with a new seed.
    /// \return void
    /// \param   int32_t seed
    ///         The seed to initialize the generator with.
    virtual void random_init( int32_t seed);

    /** virtual function **/
    /** get_random_bytes **/
    //! Return 32 random bits.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    virtual uint32_t get_random_bytes(void);

    /** virtual function **/
    /** get_random_int   **/
    //! Returns a random number in the interval [min, max].
    /// \return int32_t
    ///         A number between min and max (inclusive).
    /// \param   int32_t min
    ///         The smallest number allowed.
    /// \param   int32_t max
    ///         The largest number allowed.
    virtual int32_t get_random_int( int32_t min,
                                int32_t max);

    /** virtual function  **/
    /** get_random_double **/
    //! Return a random 64 bit floating point value in the interval [0, 1]
    /// \return double
    ///         A random 64 bit float.
    /// \param  void
    virtual double get_random_double(void);

private:
    /** function **/
    /** generate **/
    //! Fill the state array with new random numbers.
    /// \return void
    /// \param  void
    void generate(void);

    /** function    **/
    /** mother_bits **/
    //! Get random bits from the mother-of-all generator.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    uint32_t mother_bits(void);

    //! Index into state array
    uint32_t mIx;
    //! Last interval length for IRandom
    uint32_t mLastInterval;
    //! Rejection limit used by IRandom
    uint32_t mRLimit;
    //! AND mask
    __m128i mMask;
    //! State vector for SFMT generator
    __m128i mState[18];
    //! State vector for Mother-Of-All generator
    uint32_t mMotherState[5];
};

/** class                         **/
/** AlgorithmSFMT4253_MOA_C **/
//! A sfmt-mother-of-all random number generator.
class AlgorithmSFMT4253_MOA_C : public AlgorithmStub_C
{
public:
    /** constructor **/
    /// \param   int32_t seed
    ///         The seed you want to initialize the generator with.
    AlgorithmSFMT4253_MOA_C( int32_t seed);

    /** default destructor **/
    virtual ~AlgorithmSFMT4253_MOA_C();

    /** virtual function **/
    /** random_init      **/
    //! Initializes the generator with a new seed.
    /// \return void
    /// \param   int32_t seed
    ///         The seed to initialize the generator with.
    virtual void random_init( int32_t seed);

    /** virtual function **/
    /** get_random_bytes **/
    //! Return 32 random bits.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    virtual uint32_t get_random_bytes(void);

    /** virtual function **/
    /** get_random_int   **/
    //! Returns a random number in the interval [min, max].
    /// \return int32_t
    ///         A number between min and max (inclusive).
    /// \param   int32_t min
    ///         The smallest number allowed.
    /// \param   int32_t max
    ///         The largest number allowed.
    virtual int32_t get_random_int( int32_t min,
                                int32_t max);

    /** virtual function  **/
    /** get_random_double **/
    //! Return a random 64 bit floating point value in the interval [0, 1]
    /// \return double
    ///         A random 64 bit float.
    /// \param  void
    virtual double get_random_double(void);

private:
    /** function **/
    /** generate **/
    //! Fill the state array with new random numbers.
    /// \return void
    /// \param  void
    void generate(void);

    /** function    **/
    /** mother_bits **/
    //! Get random bits from the mother-of-all generator.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    uint32_t mother_bits(void);

    //! Index into state array
    uint32_t mIx;
    //! Last interval length for IRandom
    uint32_t mLastInterval;
    //! Rejection limit used by IRandom
    uint32_t mRLimit;
    //! AND mask
    __m128i mMask;
    //! State vector for SFMT generator
    __m128i mState[34];
    //! State vector for Mother-Of-All generator
    uint32_t mMotherState[5];
};

/** class                          **/
/** AlgorithmSFMT11213_MOA_C **/
//! A sfmt-mother-of-all random number generator.
class AlgorithmSFMT11213_MOA_C : public AlgorithmStub_C
{
public:
    /** constructor **/
    /// \param   int32_t seed
    ///         The seed you want to initialize the generator with.
    AlgorithmSFMT11213_MOA_C( int32_t seed);

    /** default destructor **/
    virtual ~AlgorithmSFMT11213_MOA_C();

    /** virtual function **/
    /** random_init      **/
    //! Initializes the generator with a new seed.
    /// \return void
    /// \param   int32_t seed
    ///         The seed to initialize the generator with.
    virtual void random_init( int32_t seed);

    /** virtual function **/
    /** get_random_bytes **/
    //! Return 32 random bits.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    virtual uint32_t get_random_bytes(void);

    /** virtual function **/
    /** get_random_int   **/
    //! Returns a random number in the interval [min, max].
    /// \return int32_t
    ///         A number between min and max (inclusive).
    /// \param   int32_t min
    ///         The smallest number allowed.
    /// \param   int32_t max
    ///         The largest number allowed.
    virtual int32_t get_random_int( int32_t min,
                                int32_t max);

    /** virtual function  **/
    /** get_random_double **/
    //! Return a random 64 bit floating point value in the interval [0, 1]
    /// \return double
    ///         A random 64 bit float.
    /// \param  void
    virtual double get_random_double(void);

private:
    /** function **/
    /** generate **/
    //! Fill the state array with new random numbers.
    /// \return void
    /// \param  void
    void generate(void);

    /** function    **/
    /** mother_bits **/
    //! Get random bits from the mother-of-all generator.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    uint32_t mother_bits(void);

    //! Index into state array
    uint32_t mIx;
    //! Last interval length for IRandom
    uint32_t mLastInterval;
    //! Rejection limit used by IRandom
    uint32_t mRLimit;
    //! AND mask
    __m128i mMask;
    //! State vector for SFMT generator
    __m128i mState[88];
    //! State vector for Mother-Of-All generator
    uint32_t mMotherState[5];
};

/** class                          **/
/** AlgorithmSFMT19937_MOA_C **/
//! A sfmt-mother-of-all random number generator.
class AlgorithmSFMT19937_MOA_C : public AlgorithmStub_C
{
public:
    /** constructor **/
    /// \param   int32_t seed
    ///         The seed you want to initialize the generator with.
    AlgorithmSFMT19937_MOA_C( int32_t seed);

    /** default destructor **/
    virtual ~AlgorithmSFMT19937_MOA_C();

    /** virtual function **/
    /** random_init      **/
    //! Initializes the generator with a new seed.
    /// \return void
    /// \param   int32_t seed
    ///         The seed to initialize the generator with.
    virtual void random_init( int32_t seed);

    /** virtual function **/
    /** get_random_bytes **/
    //! Return 32 random bits.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    virtual uint32_t get_random_bytes(void);

    /** virtual function **/
    /** get_random_int   **/
    //! Returns a random number in the interval [min, max].
    /// \return int32_t
    ///         A number between min and max (inclusive).
    /// \param   int32_t min
    ///         The smallest number allowed.
    /// \param   int32_t max
    ///         The largest number allowed.
    virtual int32_t get_random_int( int32_t min,
                                int32_t max);

    /** virtual function  **/
    /** get_random_double **/
    //! Return a random 64 bit floating point value in the interval [0, 1]
    /// \return double
    ///         A random 64 bit float.
    /// \param  void
    virtual double get_random_double(void);

private:
    /** function **/
    /** generate **/
    //! Fill the state array with new random numbers.
    /// \return void
    /// \param  void
    void generate(void);

    /** function    **/
    /** mother_bits **/
    //! Get random bits from the mother-of-all generator.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    uint32_t mother_bits(void);

    //! Index into state array
    uint32_t mIx;
    //! Last interval length for IRandom
    uint32_t mLastInterval;
    //! Rejection limit used by IRandom
    uint32_t mRLimit;
    //! AND mask
    __m128i mMask;
    //! State vector for SFMT generator
    __m128i mState[156];
    //! State vector for Mother-Of-All generator
    uint32_t mMotherState[5];
};

/** class                          **/
/** AlgorithmSFMT44497_MOA_C **/
//! A sfmt-mother-of-all random number generator.
class AlgorithmSFMT44497_MOA_C : public AlgorithmStub_C
{
public:
    /** constructor **/
    /// \param   int32_t seed
    ///         The seed you want to initialize the generator with.
    AlgorithmSFMT44497_MOA_C( int32_t seed);

    /** default destructor **/
    virtual ~AlgorithmSFMT44497_MOA_C();

    /** virtual function **/
    /** random_init      **/
    //! Initializes the generator with a new seed.
    /// \return void
    /// \param   int32_t seed
    ///         The seed to initialize the generator with.
    virtual void random_init( int32_t seed);

    /** virtual function **/
    /** get_random_bytes **/
    //! Return 32 random bits.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    virtual uint32_t get_random_bytes(void);

    /** virtual function **/
    /** get_random_int   **/
    //! Returns a random number in the interval [min, max].
    /// \return int32_t
    ///         A number between min and max (inclusive).
    /// \param   int32_t min
    ///         The smallest number allowed.
    /// \param   int32_t max
    ///         The largest number allowed.
    virtual int32_t get_random_int( int32_t min,
                                int32_t max);

    /** virtual function  **/
    /** get_random_double **/
    //! Return a random 64 bit floating point value in the interval [0, 1]
    /// \return double
    ///         A random 64 bit float.
    /// \param  void
    virtual double get_random_double(void);

private:
    /** function **/
    /** generate **/
    //! Fill the state array with new random numbers.
    /// \return void
    /// \param  void
    void generate(void);

    /** function    **/
    /** mother_bits **/
    //! Get random bits from the mother-of-all generator.
    /// \return uint32_t
    ///         32 random bits.
    /// \param  void
    uint32_t mother_bits(void);

    //! Index into state array
    uint32_t mIx;
    //! Last interval length for IRandom
    uint32_t mLastInterval;
    //! Rejection limit used by IRandom
    uint32_t mRLimit;
    //! AND mask
    __m128i mMask;
    //! State vector for SFMT generator
    __m128i mState[348];
    //! State vector for Mother-Of-All generator
    uint32_t mMotherState[5];
};

} // namespace Random
} // namespace Myth

#endif // __MYTH_RANDOM_RANDOM_ALGORITHM_SFMT_C_HPP_INCLUDED__

